home *** CD-ROM | disk | FTP | other *** search
/ Freelog 22 / freelog 22.iso / Prog / Djgpp / GPC2952B.ZIP / doc / gpc / docdemos / pxscoperatordemo.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-02-09  |  242 b   |  20 lines

  1. program PXSCOperatorDemo;
  2.  
  3. type
  4.   Point = record
  5.     x, y : Real;
  6.   end;
  7.  
  8. operator + (a, b : Point) c : Point;
  9. begin
  10.   c.x := a.x + b.x;
  11.   c.y := a.y + b.y;
  12. end;
  13.  
  14. var
  15.   a, b, c : Point = (42, 0.5);
  16.  
  17. begin
  18.   c := a + b
  19. end.
  20.